<div class="row-fluid">
	<div class="span12">                    
                    <div class="head">
                        <div class="isw-grid"></div>
                        <h1>Danh sách đầu số</h1>   
                        <div class="clear"></div>
                    </div>
                    <div class="block-fluid">
                        <table cellpadding="0" cellspacing="0" width="100%" class="table">
                            <thead>
                                <tr>                                    
                                    <th width="13">ID</th> 
								<th>Shortcode </th> 
								<th>Prefix 1</th>
								<th>Prefix 2</th>
								<th>Value</th> 
								<th>Đối tác</th> 
								<th>Loại</th> 
								<th>Status</th>  
								<th>Configuration</th>                             
                                </tr>
                            </thead>
                            <tbody>
                            	<?php if($services <> null):?>
                            	<?php foreach($services as $row):?>
                                <tr>                                    
                                   <td><?php echo $row->id;?></td>
								<td><?php echo $row->shortcode;?></td> 
								<td><?php echo $row->prefix_1;?> </td> 
								<td><?php echo $row->prefix_2;?></td>
								<td><?php echo $row->return_value;?></td> 
								<td><?php echo $row->partner;?></td> 
								<td><b><?php  if($row->apptype == "1"): ?>
								iOS
								<?php endif;?>
								<?php  if($row->apptype == "2"): ?>
								Android
								<?php endif;?>
								<?php  if($row->apptype == "3"): ?>
								J2ME
								<?php endif;?>
								<?php  if($row->apptype == "4"): ?>
								WindowsPhone
								<?php endif;?>
								<?php  if($row->apptype == "5"): ?>
								BlackBerry
								<?php endif;?>
								</b></td> 
								<td><?php if($row->active == 1):?>
									<a href="<?php echo site_url('admincp/unactiveservice/'.$row->id);?>">RUNNING(click to stop)</a> 
									<?php else: ?>
									<a href="<?php echo site_url('admincp/activeservice/'.$row->id);?>">START</a>
									<?php endif;?>
								</td> 
								<td>
									<a href="<?php echo site_url('admincp/delservices/'.$row->id);?>" class="ico del">Delete</a>
									 
								</td>                              
                                </tr>
                                <?php endforeach; ?>   
                                <?php endif;?>                           
                            </tbody>
                        </table>
                    </div>
                </div> 
</div>
<div class="row-fluid">
	<div class="span12">
                    <div class="head">
                        <div class="isw-documents"></div>
                        <h1>Thêm mới đầu số</h1>
                        <div class="clear"></div>
                    </div>
                    <div class="block-fluid">                        
                       <?php echo form_open_multipart('admincp/servicescontrol'); ?>
                        <div class="row-form">
                            <div class="span3">Đầu số: </div>
                            <div class="span7">
								<input type="text" class="field size1" name="shortcode" />
							</div>
                            <div class="clear"></div>
                        </div>
                        <div class="row-form">
                            <div class="span3">Cú pháp đầu</div>
                            <div class="span9"><input type="text" class="field size1" name="prefix_1" /></div>
                            <div class="clear"></div>
                        </div> 
                        <div class="row-form">
                            <div class="span3">Cú pháp sau</div>
                            <div class="span9"><input type="text" class="field size1" name="prefix_2" /></div>
                            <div class="clear"></div>
                        </div> 
                         <div class="row-form"> 
                        	<div class="span3">Đối tác</div>
                            <div class="span9"> 
                                    <input type="text" class="field size1" name="partner" />
                             </div>
                            <div class="clear"></div>
                                
                            </div> 
                         <div class="row-form">
                            <div class="span3">Giá trị trả về</div>
                            <div class="span9"><textarea name="return_value" class="field size1" rows="10" cols="30"></textarea>
                            </div>
                            <div class="clear"></div>
                        </div>  
                        <div class="row-form">
                            <div class="span3">Loại</div>
                            <div class="span9">
								<select name="typeapp">
									<option value="0">Chọn services cho từng dòng máy</option>
									<option value="1">iOS</option>
									<option value="2">Android</option>
									<option value="3">J2ME</option>
									<option value="4">Windows Phone</option>
									<option value="5">Blackberry</option>
								</select>
                            </div>
                            <div class="clear"></div>
                        </div>  
                        <div class="row-form">
                            <div class="span3"> </div>
                            <div class="span9"><input type="submit" name="submitservices" class="button" value="Đăng Services mới" /></div>
                            <div class="clear"></div>
                        </div> 
                        <?php echo form_close(); ?> 
 				
                    </div>
                </div>
</div>

<div class="dr">
	<span></span>
</div>



